{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "%load_ext autoreload\n",
    "%autoreload 2\n",
    "import sys\n",
    "sys.path.append(\"..\")\n",
    "from optimus import Optimus\n",
    "\n",
    "# Create optimus\n",
    "_load = Optimus(\"ibis\", verbose = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "impala://cloudera:cloudera@35.223.122.210:10000/default\n"
     ]
    }
   ],
   "source": [
    "# Put your db credentials here\n",
    "db =  _load.connect(\n",
    "    driver=\"impala\",\n",
    "    host=\"35.223.122.210\", \n",
    "    database= \"default\", \n",
    "    user= \"cloudera\", \n",
    "    password = \"cloudera\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = db.table_to_df(\"prueba\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "_processing = Optimus(\"pandas\", verbose = True)\n",
    "df = _processing.from_dataframe(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting pure-sasl\n",
      "  Downloading pure-sasl-0.6.2.tar.gz (11 kB)\n",
      "Building wheels for collected packages: pure-sasl\n",
      "  Building wheel for pure-sasl (setup.py): started\n",
      "  Building wheel for pure-sasl (setup.py): finished with status 'done'\n",
      "  Created wheel for pure-sasl: filename=pure_sasl-0.6.2-py3-none-any.whl size=11435 sha256=5aa6d172a618efdeb1b9a62e705812572f668681aed405d6f40a258c76176ab5\n",
      "  Stored in directory: c:\\users\\argenisleon\\appdata\\local\\pip\\cache\\wheels\\60\\6d\\c4\\eeb9f5eae120dce84399f49fc92b447f5b9c2788217aee3209\n",
      "Successfully built pure-sasl\n",
      "Installing collected packages: pure-sasl\n",
      "Successfully installed pure-sasl-0.6.2\n"
     ]
    }
   ],
   "source": [
    "# https://github.com/cloudera/impyla/issues/315\n",
    "# pip uninstall pure-sasl\n",
    "#pip uninstall sasl\n",
    "!pip install pure-sasl"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Without an HDFS connection, certain functionality may be disabled\n"
     ]
    }
   ],
   "source": [
    "import ibis\n",
    "\n",
    "hdfs = ibis.impala.hdfs_connect(host='localhost')\n",
    "con = ibis.impala.connect(user=\"cloudera\", password=\"cloudera\", \n",
    "    host='35.223.122.210', port= 21050, database='default'\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['prueba']"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "con.list_tables()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "table = con.table('prueba', database='default')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'SELECT *\\nFROM default.`prueba`'"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "table.compile()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['__bool__',\n",
       " '__call__',\n",
       " '__class__',\n",
       " '__contains__',\n",
       " '__delattr__',\n",
       " '__dict__',\n",
       " '__dir__',\n",
       " '__doc__',\n",
       " '__eq__',\n",
       " '__format__',\n",
       " '__ge__',\n",
       " '__getattr__',\n",
       " '__getattribute__',\n",
       " '__getitem__',\n",
       " '__gt__',\n",
       " '__hash__',\n",
       " '__init__',\n",
       " '__init_subclass__',\n",
       " '__le__',\n",
       " '__len__',\n",
       " '__lt__',\n",
       " '__module__',\n",
       " '__ne__',\n",
       " '__new__',\n",
       " '__nonzero__',\n",
       " '__reduce__',\n",
       " '__reduce_ex__',\n",
       " '__repr__',\n",
       " '__setattr__',\n",
       " '__setstate__',\n",
       " '__sizeof__',\n",
       " '__str__',\n",
       " '__subclasshook__',\n",
       " '__weakref__',\n",
       " '_alter_table_helper',\n",
       " '_assert_valid',\n",
       " '_client',\n",
       " '_database',\n",
       " '_ensure_expr',\n",
       " '_execute',\n",
       " '_factory',\n",
       " '_get_type',\n",
       " '_is_materialized',\n",
       " '_is_valid',\n",
       " '_key',\n",
       " '_match_name',\n",
       " '_qualified_name',\n",
       " '_repr',\n",
       " '_repr_png_',\n",
       " '_resolve',\n",
       " '_root_tables',\n",
       " '_safe_name',\n",
       " '_type_display',\n",
       " '_unqualified_name',\n",
       " 'add_partition',\n",
       " 'aggregate',\n",
       " 'alter',\n",
       " 'alter_partition',\n",
       " 'anti_join',\n",
       " 'any_inner_join',\n",
       " 'any_left_join',\n",
       " 'asof_join',\n",
       " 'column_stats',\n",
       " 'columns',\n",
       " 'compile',\n",
       " 'compute_stats',\n",
       " 'count',\n",
       " 'cross_join',\n",
       " 'describe_formatted',\n",
       " 'difference',\n",
       " 'distinct',\n",
       " 'drop',\n",
       " 'drop_partition',\n",
       " 'equals',\n",
       " 'execute',\n",
       " 'files',\n",
       " 'filter',\n",
       " 'get_column',\n",
       " 'get_columns',\n",
       " 'group_by',\n",
       " 'groupby',\n",
       " 'head',\n",
       " 'info',\n",
       " 'inner_join',\n",
       " 'insert',\n",
       " 'intersect',\n",
       " 'invalidate_metadata',\n",
       " 'is_partitioned',\n",
       " 'join',\n",
       " 'left_join',\n",
       " 'limit',\n",
       " 'load_data',\n",
       " 'materialize',\n",
       " 'metadata',\n",
       " 'mutate',\n",
       " 'name',\n",
       " 'op',\n",
       " 'outer_join',\n",
       " 'partition_schema',\n",
       " 'partitions',\n",
       " 'pipe',\n",
       " 'projection',\n",
       " 'prueba1',\n",
       " 'refresh',\n",
       " 'relabel',\n",
       " 'rename',\n",
       " 'rowid',\n",
       " 'schema',\n",
       " 'select',\n",
       " 'semi_join',\n",
       " 'set_column',\n",
       " 'set_external',\n",
       " 'sort_by',\n",
       " 'stats',\n",
       " 'to_array',\n",
       " 'truncate',\n",
       " 'union',\n",
       " 'verify',\n",
       " 'view',\n",
       " 'visualize']"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dir(table)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>prueba1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>prueba</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  prueba1\n",
       "0  prueba"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "table.execute()\n",
    "# dir(table)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "'ImpalaClient' object has no attribute 'tables'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-13-95c5b7e060c4>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mcon\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtables\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m: 'ImpalaClient' object has no attribute 'tables'"
     ]
    }
   ],
   "source": [
    "con.tables()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['HDFS', 'ImpalaClient', 'ImpalaConnection', 'ImpalaDatabase', 'ImpalaTable', 'WebHDFS', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'add_operation', 'aggregate_function', 'client', 'com', 'compat', 'compile', 'compiler', 'connect', 'ddl', 'dialect', 'hdfs_connect', 'options', 'scalar_function', 'udf', 'verify', 'wrap_uda', 'wrap_udf']\n"
     ]
    },
    {
     "ename": "TypeError",
     "evalue": "connect() got an unexpected keyword argument 'url'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-19-cdef22199e9a>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdb\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtables\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32m~\\Documents\\Optimus\\optimus\\engines\\ibis\\io\\jdbc.py\u001b[0m in \u001b[0;36mtables\u001b[1;34m(self, schema, database, limit)\u001b[0m\n\u001b[0;32m     53\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0mtables\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mschema\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdatabase\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mlimit\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     54\u001b[0m         \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdir\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mibis\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mimpala\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 55\u001b[1;33m         \u001b[0mcon\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mibis\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mimpala\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mconnect\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0murl\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0muri\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     56\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mcon\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlist_tables\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     57\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mTypeError\u001b[0m: connect() got an unexpected keyword argument 'url'"
     ]
    }
   ],
   "source": [
    "db.tables()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "ename": "StatementError",
     "evalue": "(thriftpy2.protocol.exc.TProtocolException) No protocol version header\n[SQL: SELECT * FROM prueba LIMIT 0]",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTProtocolException\u001b[0m                        Traceback (most recent call last)",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\base.py\u001b[0m in \u001b[0;36m_execute_context\u001b[1;34m(self, dialect, constructor, statement, parameters, *args)\u001b[0m\n\u001b[0;32m   1178\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1179\u001b[1;33m             \u001b[0mcontext\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mconstructor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdialect\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mconn\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1180\u001b[0m         \u001b[1;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\default.py\u001b[0m in \u001b[0;36m_init_statement\u001b[1;34m(cls, dialect, connection, dbapi_connection, statement, parameters)\u001b[0m\n\u001b[0;32m    908\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 909\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcursor\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcreate_cursor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    910\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\sqlalchemy.py\u001b[0m in \u001b[0;36mcreate_cursor\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m    136\u001b[0m            \u001b[0mcursor_configuration\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mexecution_options\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'cursor_configuration'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m{\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 137\u001b[1;33m            \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_dbapi_connection\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcursor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mconfiguration\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mcursor_configuration\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    138\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\pool\\base.py\u001b[0m in \u001b[0;36mcursor\u001b[1;34m(self, *args, **kwargs)\u001b[0m\n\u001b[0;32m    964\u001b[0m         \"\"\"\n\u001b[1;32m--> 965\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mconnection\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcursor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    966\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\hiveserver2.py\u001b[0m in \u001b[0;36mcursor\u001b[1;34m(self, user, configuration, convert_types, dictify, fetch_error)\u001b[0m\n\u001b[0;32m    123\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 124\u001b[1;33m         \u001b[0msession\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mservice\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mopen_session\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0muser\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mconfiguration\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    125\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\hiveserver2.py\u001b[0m in \u001b[0;36mopen_session\u001b[1;34m(self, user, configuration)\u001b[0m\n\u001b[0;32m   1074\u001b[0m                               configuration=configuration)\n\u001b[1;32m-> 1075\u001b[1;33m         \u001b[0mresp\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_rpc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'OpenSession'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mreq\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1076\u001b[0m         return HS2Session(self, resp.sessionHandle,\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\hiveserver2.py\u001b[0m in \u001b[0;36m_rpc\u001b[1;34m(self, func_name, request)\u001b[0m\n\u001b[0;32m    992\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_log_request\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfunc_name\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mrequest\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 993\u001b[1;33m         \u001b[0mresponse\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_execute\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfunc_name\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mrequest\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    994\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_log_response\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfunc_name\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mresponse\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\hiveserver2.py\u001b[0m in \u001b[0;36m_execute\u001b[1;34m(self, func_name, request)\u001b[0m\n\u001b[0;32m   1009\u001b[0m                 \u001b[0mfunc\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mclient\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfunc_name\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1010\u001b[1;33m                 \u001b[1;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mrequest\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1011\u001b[0m             \u001b[1;32mexcept\u001b[0m \u001b[0msocket\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0merror\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\thriftpy2\\thrift.py\u001b[0m in \u001b[0;36m_req\u001b[1;34m(self, _api, *args, **kwargs)\u001b[0m\n\u001b[0;32m    218\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mresult_cls\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m\"oneway\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 219\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_recv\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0m_api\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    220\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\thriftpy2\\thrift.py\u001b[0m in \u001b[0;36m_recv\u001b[1;34m(self, _api)\u001b[0m\n\u001b[0;32m    230\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_recv\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0m_api\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 231\u001b[1;33m         \u001b[0mfname\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmtype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mrseqid\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_iprot\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mread_message_begin\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    232\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mmtype\u001b[0m \u001b[1;33m==\u001b[0m \u001b[0mTMessageType\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mEXCEPTION\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\thriftpy2\\protocol\\binary.py\u001b[0m in \u001b[0;36mread_message_begin\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m    372\u001b[0m         api, ttype, seqid = read_message_begin(\n\u001b[1;32m--> 373\u001b[1;33m             self.trans, strict=self.strict_read)\n\u001b[0m\u001b[0;32m    374\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mapi\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mttype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mseqid\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\thriftpy2\\protocol\\binary.py\u001b[0m in \u001b[0;36mread_message_begin\u001b[1;34m(inbuf, strict)\u001b[0m\n\u001b[0;32m    178\u001b[0m             raise TProtocolException(type=TProtocolException.BAD_VERSION,\n\u001b[1;32m--> 179\u001b[1;33m                                      message='No protocol version header')\n\u001b[0m\u001b[0;32m    180\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mTProtocolException\u001b[0m: No protocol version header",
      "\nThe above exception was the direct cause of the following exception:\n",
      "\u001b[1;31mStatementError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-13-c94897551148>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdb\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtable_to_df\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"prueba\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mext\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdisplay\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32m~\\Documents\\Optimus\\optimus\\engines\\ibis\\io\\jdbc.py\u001b[0m in \u001b[0;36mtable_to_df\u001b[1;34m(self, table_name, columns, limit)\u001b[0m\n\u001b[0;32m     59\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mlimit\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     60\u001b[0m             \u001b[0mlimit\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mLIMIT_TABLE\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 61\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mIbisDataFrame\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdb\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtable\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtable_name\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlimit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlimit\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\ibis\\backends\\mysql\\client.py\u001b[0m in \u001b[0;36mtable\u001b[1;34m(self, name, database, schema)\u001b[0m\n\u001b[0;32m    202\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdatabase\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mdatabase\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtable\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mschema\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mschema\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    203\u001b[0m         \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 204\u001b[1;33m             \u001b[0malch_table\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_get_sqla_table\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mschema\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mschema\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    205\u001b[0m             \u001b[0mnode\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtable_class\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0malch_table\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_schemas\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    206\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtable_expr_class\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mnode\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\ibis\\backends\\base_sqlalchemy\\alchemy.py\u001b[0m in \u001b[0;36m_get_sqla_table\u001b[1;34m(self, name, schema, autoload)\u001b[0m\n\u001b[0;32m   1298\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1299\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_get_sqla_table\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mschema\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mautoload\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1300\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0msa\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mTable\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmeta\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mschema\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mschema\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mautoload\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mautoload\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1301\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1302\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_sqla_table_to_expr\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtable\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m<string>\u001b[0m in \u001b[0;36m__new__\u001b[1;34m(cls, *args, **kw)\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\util\\deprecations.py\u001b[0m in \u001b[0;36mwarned\u001b[1;34m(fn, *args, **kwargs)\u001b[0m\n\u001b[0;32m    126\u001b[0m                     )\n\u001b[0;32m    127\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 128\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    129\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    130\u001b[0m         \u001b[0mdoc\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mfn\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__doc__\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32mNone\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0mfn\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__doc__\u001b[0m \u001b[1;32mor\u001b[0m \u001b[1;34m\"\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\sql\\schema.py\u001b[0m in \u001b[0;36m__new__\u001b[1;34m(cls, *args, **kw)\u001b[0m\n\u001b[0;32m    494\u001b[0m             \u001b[1;32mexcept\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    495\u001b[0m                 \u001b[1;32mwith\u001b[0m \u001b[0mutil\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msafe_reraise\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 496\u001b[1;33m                     \u001b[0mmetadata\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_remove_table\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mschema\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    497\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    498\u001b[0m     \u001b[1;33m@\u001b[0m\u001b[0mproperty\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\util\\langhelpers.py\u001b[0m in \u001b[0;36m__exit__\u001b[1;34m(self, type_, value, traceback)\u001b[0m\n\u001b[0;32m     66\u001b[0m             \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_exc_info\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mNone\u001b[0m  \u001b[1;31m# remove potential circular references\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     67\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mwarn_only\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 68\u001b[1;33m                 \u001b[0mcompat\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreraise\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mexc_type\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mexc_value\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mexc_tb\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     69\u001b[0m         \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     70\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mcompat\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpy3k\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_exc_info\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_exc_info\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\util\\compat.py\u001b[0m in \u001b[0;36mreraise\u001b[1;34m(tp, value, tb, cause)\u001b[0m\n\u001b[0;32m    151\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__traceback__\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mtb\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    152\u001b[0m             \u001b[1;32mraise\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mwith_traceback\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtb\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 153\u001b[1;33m         \u001b[1;32mraise\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    154\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    155\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0mu\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ms\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\sql\\schema.py\u001b[0m in \u001b[0;36m__new__\u001b[1;34m(cls, *args, **kw)\u001b[0m\n\u001b[0;32m    489\u001b[0m             \u001b[0mmetadata\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_add_table\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mschema\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtable\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    490\u001b[0m             \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 491\u001b[1;33m                 \u001b[0mtable\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_init\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmetadata\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    492\u001b[0m                 \u001b[0mtable\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdispatch\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mafter_parent_attach\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtable\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmetadata\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    493\u001b[0m                 \u001b[1;32mreturn\u001b[0m \u001b[0mtable\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\sql\\schema.py\u001b[0m in \u001b[0;36m_init\u001b[1;34m(self, name, metadata, *args, **kwargs)\u001b[0m\n\u001b[0;32m    583\u001b[0m                 \u001b[0minclude_columns\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    584\u001b[0m                 \u001b[0m_extend_on\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0m_extend_on\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 585\u001b[1;33m                 \u001b[0mresolve_fks\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mresolve_fks\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    586\u001b[0m             )\n\u001b[0;32m    587\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\sql\\schema.py\u001b[0m in \u001b[0;36m_autoload\u001b[1;34m(self, metadata, autoload_with, include_columns, exclude_columns, resolve_fks, _extend_on)\u001b[0m\n\u001b[0;32m    624\u001b[0m                 \u001b[0mexclude_columns\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    625\u001b[0m                 \u001b[0mresolve_fks\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 626\u001b[1;33m                 \u001b[0m_extend_on\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0m_extend_on\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    627\u001b[0m             )\n\u001b[0;32m    628\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\base.py\u001b[0m in \u001b[0;36mrun_callable\u001b[1;34m(self, callable_, *args, **kwargs)\u001b[0m\n\u001b[0;32m   2148\u001b[0m         \"\"\"\n\u001b[0;32m   2149\u001b[0m         \u001b[1;32mwith\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_contextual_connect\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mconn\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2150\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mconn\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun_callable\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcallable_\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   2151\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2152\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0mexecute\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstatement\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m*\u001b[0m\u001b[0mmultiparams\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mparams\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\base.py\u001b[0m in \u001b[0;36mrun_callable\u001b[1;34m(self, callable_, *args, **kwargs)\u001b[0m\n\u001b[0;32m   1602\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1603\u001b[0m         \"\"\"\n\u001b[1;32m-> 1604\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mcallable_\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1605\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1606\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_run_visitor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mvisitorcallable\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0melement\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\default.py\u001b[0m in \u001b[0;36mreflecttable\u001b[1;34m(self, connection, table, include_columns, exclude_columns, resolve_fks, **opts)\u001b[0m\n\u001b[0;32m    429\u001b[0m         \u001b[0minsp\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mreflection\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mInspector\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfrom_engine\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mconnection\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    430\u001b[0m         return insp.reflecttable(\n\u001b[1;32m--> 431\u001b[1;33m             \u001b[0mtable\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0minclude_columns\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mexclude_columns\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mresolve_fks\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mopts\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    432\u001b[0m         )\n\u001b[0;32m    433\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\reflection.py\u001b[0m in \u001b[0;36mreflecttable\u001b[1;34m(self, table, include_columns, exclude_columns, resolve_fks, _extend_on)\u001b[0m\n\u001b[0;32m    638\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    639\u001b[0m         for col_d in self.get_columns(\n\u001b[1;32m--> 640\u001b[1;33m             \u001b[0mtable_name\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mschema\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mtable\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdialect_kwargs\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    641\u001b[0m         ):\n\u001b[0;32m    642\u001b[0m             \u001b[0mfound_table\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\reflection.py\u001b[0m in \u001b[0;36mget_columns\u001b[1;34m(self, table_name, schema, **kw)\u001b[0m\n\u001b[0;32m    371\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    372\u001b[0m         col_defs = self.dialect.get_columns(\n\u001b[1;32m--> 373\u001b[1;33m             \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbind\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtable_name\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mschema\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0minfo_cache\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0minfo_cache\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    374\u001b[0m         )\n\u001b[0;32m    375\u001b[0m         \u001b[1;32mfor\u001b[0m \u001b[0mcol_def\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mcol_defs\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\sqlalchemy.py\u001b[0m in \u001b[0;36mget_columns\u001b[1;34m(self, connection, table_name, schema, **kwargs)\u001b[0m\n\u001b[0;32m    204\u001b[0m             \u001b[0mname\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'%s.%s'\u001b[0m \u001b[1;33m%\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mschema\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    205\u001b[0m         \u001b[0mquery\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'SELECT * FROM %s LIMIT 0'\u001b[0m \u001b[1;33m%\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 206\u001b[1;33m         \u001b[0mcursor\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mconnection\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mexecute\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mquery\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    207\u001b[0m         \u001b[0mschema\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcursor\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcursor\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdescription\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    208\u001b[0m         \u001b[1;31m# We need to fetch the empty results otherwise these queries remain in\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\base.py\u001b[0m in \u001b[0;36mexecute\u001b[1;34m(self, object_, *multiparams, **params)\u001b[0m\n\u001b[0;32m    980\u001b[0m         \"\"\"\n\u001b[0;32m    981\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mobject_\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mutil\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstring_types\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 982\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_execute_text\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mobject_\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmultiparams\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mparams\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    983\u001b[0m         \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    984\u001b[0m             \u001b[0mmeth\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mobject_\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_execute_on_connection\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\base.py\u001b[0m in \u001b[0;36m_execute_text\u001b[1;34m(self, statement, multiparams, params)\u001b[0m\n\u001b[0;32m   1153\u001b[0m             \u001b[0mparameters\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1154\u001b[0m             \u001b[0mstatement\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1155\u001b[1;33m             \u001b[0mparameters\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1156\u001b[0m         )\n\u001b[0;32m   1157\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_has_events\u001b[0m \u001b[1;32mor\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mengine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_has_events\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\base.py\u001b[0m in \u001b[0;36m_execute_context\u001b[1;34m(self, dialect, constructor, statement, parameters, *args)\u001b[0m\n\u001b[0;32m   1180\u001b[0m         \u001b[1;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1181\u001b[0m             self._handle_dbapi_exception(\n\u001b[1;32m-> 1182\u001b[1;33m                 \u001b[0me\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mutil\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtext_type\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstatement\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mparameters\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1183\u001b[0m             )\n\u001b[0;32m   1184\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\base.py\u001b[0m in \u001b[0;36m_handle_dbapi_exception\u001b[1;34m(self, e, statement, parameters, cursor, context)\u001b[0m\n\u001b[0;32m   1464\u001b[0m                 \u001b[0mutil\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mraise_from_cause\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mnewraise\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mexc_info\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1465\u001b[0m             \u001b[1;32melif\u001b[0m \u001b[0mshould_wrap\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1466\u001b[1;33m                 \u001b[0mutil\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mraise_from_cause\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msqlalchemy_exception\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mexc_info\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1467\u001b[0m             \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1468\u001b[0m                 \u001b[0mutil\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreraise\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mexc_info\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\util\\compat.py\u001b[0m in \u001b[0;36mraise_from_cause\u001b[1;34m(exception, exc_info)\u001b[0m\n\u001b[0;32m    396\u001b[0m     \u001b[0mexc_type\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mexc_value\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mexc_tb\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mexc_info\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    397\u001b[0m     \u001b[0mcause\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mexc_value\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mexc_value\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mexception\u001b[0m \u001b[1;32melse\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 398\u001b[1;33m     \u001b[0mreraise\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mexception\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mexception\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtb\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mexc_tb\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcause\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mcause\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    399\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    400\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\util\\compat.py\u001b[0m in \u001b[0;36mreraise\u001b[1;34m(tp, value, tb, cause)\u001b[0m\n\u001b[0;32m    150\u001b[0m             \u001b[0mvalue\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__cause__\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcause\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    151\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__traceback__\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mtb\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 152\u001b[1;33m             \u001b[1;32mraise\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mwith_traceback\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtb\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    153\u001b[0m         \u001b[1;32mraise\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    154\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\base.py\u001b[0m in \u001b[0;36m_execute_context\u001b[1;34m(self, dialect, constructor, statement, parameters, *args)\u001b[0m\n\u001b[0;32m   1177\u001b[0m                 \u001b[0mconn\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_revalidate_connection\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1178\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1179\u001b[1;33m             \u001b[0mcontext\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mconstructor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdialect\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mconn\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1180\u001b[0m         \u001b[1;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1181\u001b[0m             self._handle_dbapi_exception(\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\engine\\default.py\u001b[0m in \u001b[0;36m_init_statement\u001b[1;34m(cls, dialect, connection, dbapi_connection, statement, parameters)\u001b[0m\n\u001b[0;32m    907\u001b[0m             \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstatement\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0municode_statement\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mstatement\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    908\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 909\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcursor\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcreate_cursor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    910\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    911\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\sqlalchemy.py\u001b[0m in \u001b[0;36mcreate_cursor\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m    135\u001b[0m            \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_server_side\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    136\u001b[0m            \u001b[0mcursor_configuration\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mexecution_options\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'cursor_configuration'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m{\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 137\u001b[1;33m            \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_dbapi_connection\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcursor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mconfiguration\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mcursor_configuration\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    138\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    139\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sqlalchemy\\pool\\base.py\u001b[0m in \u001b[0;36mcursor\u001b[1;34m(self, *args, **kwargs)\u001b[0m\n\u001b[0;32m    963\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    964\u001b[0m         \"\"\"\n\u001b[1;32m--> 965\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mconnection\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcursor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    966\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    967\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m__getattr__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\hiveserver2.py\u001b[0m in \u001b[0;36mcursor\u001b[1;34m(self, user, configuration, convert_types, dictify, fetch_error)\u001b[0m\n\u001b[0;32m    122\u001b[0m         \u001b[0mlog\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdebug\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'.cursor(): getting new session_handle'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    123\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 124\u001b[1;33m         \u001b[0msession\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mservice\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mopen_session\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0muser\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mconfiguration\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    125\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    126\u001b[0m         log.debug('HiveServer2Cursor(service=%s, session_handle=%s, '\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\hiveserver2.py\u001b[0m in \u001b[0;36mopen_session\u001b[1;34m(self, user, configuration)\u001b[0m\n\u001b[0;32m   1073\u001b[0m                               \u001b[0musername\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0muser\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1074\u001b[0m                               configuration=configuration)\n\u001b[1;32m-> 1075\u001b[1;33m         \u001b[0mresp\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_rpc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'OpenSession'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mreq\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1076\u001b[0m         return HS2Session(self, resp.sessionHandle,\n\u001b[0;32m   1077\u001b[0m                           \u001b[0mresp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mconfiguration\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\hiveserver2.py\u001b[0m in \u001b[0;36m_rpc\u001b[1;34m(self, func_name, request)\u001b[0m\n\u001b[0;32m    991\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_rpc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfunc_name\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mrequest\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    992\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_log_request\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfunc_name\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mrequest\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 993\u001b[1;33m         \u001b[0mresponse\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_execute\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfunc_name\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mrequest\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    994\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_log_response\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfunc_name\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mresponse\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    995\u001b[0m         \u001b[0merr_if_rpc_not_ok\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mresponse\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\impala\\hiveserver2.py\u001b[0m in \u001b[0;36m_execute\u001b[1;34m(self, func_name, request)\u001b[0m\n\u001b[0;32m   1008\u001b[0m                 \u001b[0mlog\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdebug\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'Transport opened'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1009\u001b[0m                 \u001b[0mfunc\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mclient\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfunc_name\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1010\u001b[1;33m                 \u001b[1;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mrequest\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1011\u001b[0m             \u001b[1;32mexcept\u001b[0m \u001b[0msocket\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0merror\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1012\u001b[0m                 log.exception('Failed to open transport (tries_left=%s)',\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\thriftpy2\\thrift.py\u001b[0m in \u001b[0;36m_req\u001b[1;34m(self, _api, *args, **kwargs)\u001b[0m\n\u001b[0;32m    217\u001b[0m         \u001b[1;31m# wait result only if non-oneway\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    218\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mresult_cls\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m\"oneway\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 219\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_recv\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0m_api\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    220\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    221\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_send\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0m_api\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\thriftpy2\\thrift.py\u001b[0m in \u001b[0;36m_recv\u001b[1;34m(self, _api)\u001b[0m\n\u001b[0;32m    229\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    230\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_recv\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0m_api\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 231\u001b[1;33m         \u001b[0mfname\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmtype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mrseqid\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_iprot\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mread_message_begin\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    232\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mmtype\u001b[0m \u001b[1;33m==\u001b[0m \u001b[0mTMessageType\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mEXCEPTION\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    233\u001b[0m             \u001b[0mx\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mTApplicationException\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\thriftpy2\\protocol\\binary.py\u001b[0m in \u001b[0;36mread_message_begin\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m    371\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0mread_message_begin\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    372\u001b[0m         api, ttype, seqid = read_message_begin(\n\u001b[1;32m--> 373\u001b[1;33m             self.trans, strict=self.strict_read)\n\u001b[0m\u001b[0;32m    374\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mapi\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mttype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mseqid\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    375\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\thriftpy2\\protocol\\binary.py\u001b[0m in \u001b[0;36mread_message_begin\u001b[1;34m(inbuf, strict)\u001b[0m\n\u001b[0;32m    177\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mstrict\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    178\u001b[0m             raise TProtocolException(type=TProtocolException.BAD_VERSION,\n\u001b[1;32m--> 179\u001b[1;33m                                      message='No protocol version header')\n\u001b[0m\u001b[0;32m    180\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    181\u001b[0m         \u001b[0mname\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0minbuf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mread\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msz\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdecode\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'utf-8'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mStatementError\u001b[0m: (thriftpy2.protocol.exc.TProtocolException) No protocol version header\n[SQL: SELECT * FROM prueba LIMIT 0]"
     ]
    }
   ],
   "source": [
    "db.table_to_df(\"prueba\").ext.display()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>INCIDENT_NUMBER</th>\n",
       "      <th>OFFENSE_CODE</th>\n",
       "      <th>OFFENSE_CODE_GROUP</th>\n",
       "      <th>OFFENSE_DESCRIPTION</th>\n",
       "      <th>DISTRICT</th>\n",
       "      <th>REPORTING_AREA</th>\n",
       "      <th>SHOOTING</th>\n",
       "      <th>OCCURRED_ON_DATE</th>\n",
       "      <th>YEAR</th>\n",
       "      <th>MONTH</th>\n",
       "      <th>DAY_OF_WEEK</th>\n",
       "      <th>HOUR</th>\n",
       "      <th>UCR_PART</th>\n",
       "      <th>STREET</th>\n",
       "      <th>Lat</th>\n",
       "      <th>Long</th>\n",
       "      <th>Location</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>I182070945</td>\n",
       "      <td>00619</td>\n",
       "      <td>Larceny</td>\n",
       "      <td>LARCENY ALL OTHERS</td>\n",
       "      <td>D14</td>\n",
       "      <td>808</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-02 13:00:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Sunday</td>\n",
       "      <td>13</td>\n",
       "      <td>Part One</td>\n",
       "      <td>LINCOLN ST</td>\n",
       "      <td>42.35779134</td>\n",
       "      <td>-71.13937053</td>\n",
       "      <td>(42.35779134, -71.13937053)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>I182070943</td>\n",
       "      <td>01402</td>\n",
       "      <td>Vandalism</td>\n",
       "      <td>VANDALISM</td>\n",
       "      <td>C11</td>\n",
       "      <td>347</td>\n",
       "      <td></td>\n",
       "      <td>2018-08-21 00:00:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>8</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>0</td>\n",
       "      <td>Part Two</td>\n",
       "      <td>HECLA ST</td>\n",
       "      <td>42.30682138</td>\n",
       "      <td>-71.06030035</td>\n",
       "      <td>(42.30682138, -71.06030035)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>I182070941</td>\n",
       "      <td>03410</td>\n",
       "      <td>Towed</td>\n",
       "      <td>TOWED MOTOR VEHICLE</td>\n",
       "      <td>D4</td>\n",
       "      <td>151</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 19:27:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>19</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>CAZENOVE ST</td>\n",
       "      <td>42.34658879</td>\n",
       "      <td>-71.07242943</td>\n",
       "      <td>(42.34658879, -71.07242943)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>I182070940</td>\n",
       "      <td>03114</td>\n",
       "      <td>Investigate Property</td>\n",
       "      <td>INVESTIGATE PROPERTY</td>\n",
       "      <td>D4</td>\n",
       "      <td>272</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 21:16:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>21</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>NEWCOMB ST</td>\n",
       "      <td>42.33418175</td>\n",
       "      <td>-71.07866441</td>\n",
       "      <td>(42.33418175, -71.07866441)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>I182070938</td>\n",
       "      <td>03114</td>\n",
       "      <td>Investigate Property</td>\n",
       "      <td>INVESTIGATE PROPERTY</td>\n",
       "      <td>B3</td>\n",
       "      <td>421</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 21:05:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>21</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>DELHI ST</td>\n",
       "      <td>42.27536542</td>\n",
       "      <td>-71.09036101</td>\n",
       "      <td>(42.27536542, -71.09036101)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>I182070936</td>\n",
       "      <td>03820</td>\n",
       "      <td>Motor Vehicle Accident Response</td>\n",
       "      <td>M/V ACCIDENT INVOLVING PEDESTRIAN - INJURY</td>\n",
       "      <td>C11</td>\n",
       "      <td>398</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 21:09:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>21</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>TALBOT AVE</td>\n",
       "      <td>42.29019621</td>\n",
       "      <td>-71.07159012</td>\n",
       "      <td>(42.29019621, -71.07159012)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>I182070933</td>\n",
       "      <td>00724</td>\n",
       "      <td>Auto Theft</td>\n",
       "      <td>AUTO THEFT</td>\n",
       "      <td>B2</td>\n",
       "      <td>330</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 21:25:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>21</td>\n",
       "      <td>Part One</td>\n",
       "      <td>NORMANDY ST</td>\n",
       "      <td>42.30607218</td>\n",
       "      <td>-71.08273260</td>\n",
       "      <td>(42.30607218, -71.08273260)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>I182070932</td>\n",
       "      <td>03301</td>\n",
       "      <td>Verbal Disputes</td>\n",
       "      <td>VERBAL DISPUTE</td>\n",
       "      <td>B2</td>\n",
       "      <td>584</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 20:39:37</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>20</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>LAWN ST</td>\n",
       "      <td>42.32701648</td>\n",
       "      <td>-71.10555088</td>\n",
       "      <td>(42.32701648, -71.10555088)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>I182070931</td>\n",
       "      <td>00301</td>\n",
       "      <td>Robbery</td>\n",
       "      <td>ROBBERY - STREET</td>\n",
       "      <td>C6</td>\n",
       "      <td>177</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 20:48:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>20</td>\n",
       "      <td>Part One</td>\n",
       "      <td>MASSACHUSETTS AVE</td>\n",
       "      <td>42.33152148</td>\n",
       "      <td>-71.07085307</td>\n",
       "      <td>(42.33152148, -71.07085307)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>I182070929</td>\n",
       "      <td>03301</td>\n",
       "      <td>Verbal Disputes</td>\n",
       "      <td>VERBAL DISPUTE</td>\n",
       "      <td>C11</td>\n",
       "      <td>364</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 20:38:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>20</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>LESLIE ST</td>\n",
       "      <td>42.29514664</td>\n",
       "      <td>-71.05860832</td>\n",
       "      <td>(42.29514664, -71.05860832)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  INCIDENT_NUMBER OFFENSE_CODE               OFFENSE_CODE_GROUP  \\\n",
       "0      I182070945        00619                          Larceny   \n",
       "1      I182070943        01402                        Vandalism   \n",
       "2      I182070941        03410                            Towed   \n",
       "3      I182070940        03114             Investigate Property   \n",
       "4      I182070938        03114             Investigate Property   \n",
       "5      I182070936        03820  Motor Vehicle Accident Response   \n",
       "6      I182070933        00724                       Auto Theft   \n",
       "7      I182070932        03301                  Verbal Disputes   \n",
       "8      I182070931        00301                          Robbery   \n",
       "9      I182070929        03301                  Verbal Disputes   \n",
       "\n",
       "                          OFFENSE_DESCRIPTION DISTRICT REPORTING_AREA  \\\n",
       "0                          LARCENY ALL OTHERS      D14            808   \n",
       "1                                   VANDALISM      C11            347   \n",
       "2                         TOWED MOTOR VEHICLE       D4            151   \n",
       "3                        INVESTIGATE PROPERTY       D4            272   \n",
       "4                        INVESTIGATE PROPERTY       B3            421   \n",
       "5  M/V ACCIDENT INVOLVING PEDESTRIAN - INJURY      C11            398   \n",
       "6                                  AUTO THEFT       B2            330   \n",
       "7                              VERBAL DISPUTE       B2            584   \n",
       "8                            ROBBERY - STREET       C6            177   \n",
       "9                              VERBAL DISPUTE      C11            364   \n",
       "\n",
       "  SHOOTING     OCCURRED_ON_DATE  YEAR MONTH DAY_OF_WEEK HOUR    UCR_PART  \\\n",
       "0           2018-09-02 13:00:00  2018     9      Sunday   13    Part One   \n",
       "1           2018-08-21 00:00:00  2018     8     Tuesday    0    Part Two   \n",
       "2           2018-09-03 19:27:00  2018     9      Monday   19  Part Three   \n",
       "3           2018-09-03 21:16:00  2018     9      Monday   21  Part Three   \n",
       "4           2018-09-03 21:05:00  2018     9      Monday   21  Part Three   \n",
       "5           2018-09-03 21:09:00  2018     9      Monday   21  Part Three   \n",
       "6           2018-09-03 21:25:00  2018     9      Monday   21    Part One   \n",
       "7           2018-09-03 20:39:37  2018     9      Monday   20  Part Three   \n",
       "8           2018-09-03 20:48:00  2018     9      Monday   20    Part One   \n",
       "9           2018-09-03 20:38:00  2018     9      Monday   20  Part Three   \n",
       "\n",
       "              STREET          Lat          Long                     Location  \n",
       "0         LINCOLN ST  42.35779134  -71.13937053  (42.35779134, -71.13937053)  \n",
       "1           HECLA ST  42.30682138  -71.06030035  (42.30682138, -71.06030035)  \n",
       "2        CAZENOVE ST  42.34658879  -71.07242943  (42.34658879, -71.07242943)  \n",
       "3         NEWCOMB ST  42.33418175  -71.07866441  (42.33418175, -71.07866441)  \n",
       "4           DELHI ST  42.27536542  -71.09036101  (42.27536542, -71.09036101)  \n",
       "5         TALBOT AVE  42.29019621  -71.07159012  (42.29019621, -71.07159012)  \n",
       "6        NORMANDY ST  42.30607218  -71.08273260  (42.30607218, -71.08273260)  \n",
       "7            LAWN ST  42.32701648  -71.10555088  (42.32701648, -71.10555088)  \n",
       "8  MASSACHUSETTS AVE  42.33152148  -71.07085307  (42.33152148, -71.07085307)  \n",
       "9          LESLIE ST  42.29514664  -71.05860832  (42.29514664, -71.05860832)  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "df1 = df.cols.lower(\"INCIDENT_NUMBER\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>INCIDENT_NUMBER</th>\n",
       "      <th>OFFENSE_CODE</th>\n",
       "      <th>OFFENSE_CODE_GROUP</th>\n",
       "      <th>OFFENSE_DESCRIPTION</th>\n",
       "      <th>DISTRICT</th>\n",
       "      <th>REPORTING_AREA</th>\n",
       "      <th>SHOOTING</th>\n",
       "      <th>OCCURRED_ON_DATE</th>\n",
       "      <th>YEAR</th>\n",
       "      <th>MONTH</th>\n",
       "      <th>DAY_OF_WEEK</th>\n",
       "      <th>HOUR</th>\n",
       "      <th>UCR_PART</th>\n",
       "      <th>STREET</th>\n",
       "      <th>Lat</th>\n",
       "      <th>Long</th>\n",
       "      <th>Location</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>I182070945</td>\n",
       "      <td>00619</td>\n",
       "      <td>Larceny</td>\n",
       "      <td>LARCENY ALL OTHERS</td>\n",
       "      <td>D14</td>\n",
       "      <td>808</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-02 13:00:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Sunday</td>\n",
       "      <td>13</td>\n",
       "      <td>Part One</td>\n",
       "      <td>LINCOLN ST</td>\n",
       "      <td>42.35779134</td>\n",
       "      <td>-71.13937053</td>\n",
       "      <td>(42.35779134, -71.13937053)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>I182070943</td>\n",
       "      <td>01402</td>\n",
       "      <td>Vandalism</td>\n",
       "      <td>VANDALISM</td>\n",
       "      <td>C11</td>\n",
       "      <td>347</td>\n",
       "      <td></td>\n",
       "      <td>2018-08-21 00:00:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>8</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>0</td>\n",
       "      <td>Part Two</td>\n",
       "      <td>HECLA ST</td>\n",
       "      <td>42.30682138</td>\n",
       "      <td>-71.06030035</td>\n",
       "      <td>(42.30682138, -71.06030035)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>I182070941</td>\n",
       "      <td>03410</td>\n",
       "      <td>Towed</td>\n",
       "      <td>TOWED MOTOR VEHICLE</td>\n",
       "      <td>D4</td>\n",
       "      <td>151</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 19:27:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>19</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>CAZENOVE ST</td>\n",
       "      <td>42.34658879</td>\n",
       "      <td>-71.07242943</td>\n",
       "      <td>(42.34658879, -71.07242943)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>I182070940</td>\n",
       "      <td>03114</td>\n",
       "      <td>Investigate Property</td>\n",
       "      <td>INVESTIGATE PROPERTY</td>\n",
       "      <td>D4</td>\n",
       "      <td>272</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 21:16:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>21</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>NEWCOMB ST</td>\n",
       "      <td>42.33418175</td>\n",
       "      <td>-71.07866441</td>\n",
       "      <td>(42.33418175, -71.07866441)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>I182070938</td>\n",
       "      <td>03114</td>\n",
       "      <td>Investigate Property</td>\n",
       "      <td>INVESTIGATE PROPERTY</td>\n",
       "      <td>B3</td>\n",
       "      <td>421</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 21:05:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>21</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>DELHI ST</td>\n",
       "      <td>42.27536542</td>\n",
       "      <td>-71.09036101</td>\n",
       "      <td>(42.27536542, -71.09036101)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319068</th>\n",
       "      <td>I050310906-00</td>\n",
       "      <td>03125</td>\n",
       "      <td>Warrant Arrests</td>\n",
       "      <td>WARRANT ARREST</td>\n",
       "      <td>D4</td>\n",
       "      <td>285</td>\n",
       "      <td></td>\n",
       "      <td>2016-06-05 17:25:00</td>\n",
       "      <td>2016</td>\n",
       "      <td>6</td>\n",
       "      <td>Sunday</td>\n",
       "      <td>17</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>COVENTRY ST</td>\n",
       "      <td>42.33695098</td>\n",
       "      <td>-71.08574813</td>\n",
       "      <td>(42.33695098, -71.08574813)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319069</th>\n",
       "      <td>I030217815-08</td>\n",
       "      <td>00111</td>\n",
       "      <td>Homicide</td>\n",
       "      <td>MURDER, NON-NEGLIGIENT MANSLAUGHTER</td>\n",
       "      <td>E18</td>\n",
       "      <td>520</td>\n",
       "      <td></td>\n",
       "      <td>2015-07-09 13:38:00</td>\n",
       "      <td>2015</td>\n",
       "      <td>7</td>\n",
       "      <td>Thursday</td>\n",
       "      <td>13</td>\n",
       "      <td>Part One</td>\n",
       "      <td>RIVER ST</td>\n",
       "      <td>42.25592648</td>\n",
       "      <td>-71.12317207</td>\n",
       "      <td>(42.25592648, -71.12317207)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319070</th>\n",
       "      <td>I030217815-08</td>\n",
       "      <td>03125</td>\n",
       "      <td>Warrant Arrests</td>\n",
       "      <td>WARRANT ARREST</td>\n",
       "      <td>E18</td>\n",
       "      <td>520</td>\n",
       "      <td></td>\n",
       "      <td>2015-07-09 13:38:00</td>\n",
       "      <td>2015</td>\n",
       "      <td>7</td>\n",
       "      <td>Thursday</td>\n",
       "      <td>13</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>RIVER ST</td>\n",
       "      <td>42.25592648</td>\n",
       "      <td>-71.12317207</td>\n",
       "      <td>(42.25592648, -71.12317207)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319071</th>\n",
       "      <td>I010370257-00</td>\n",
       "      <td>03125</td>\n",
       "      <td>Warrant Arrests</td>\n",
       "      <td>WARRANT ARREST</td>\n",
       "      <td>E13</td>\n",
       "      <td>569</td>\n",
       "      <td></td>\n",
       "      <td>2016-05-31 19:35:00</td>\n",
       "      <td>2016</td>\n",
       "      <td>5</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>19</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>NEW WASHINGTON ST</td>\n",
       "      <td>42.30233307</td>\n",
       "      <td>-71.11156487</td>\n",
       "      <td>(42.30233307, -71.11156487)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319072</th>\n",
       "      <td>142052550</td>\n",
       "      <td>03125</td>\n",
       "      <td>Warrant Arrests</td>\n",
       "      <td>WARRANT ARREST</td>\n",
       "      <td>D4</td>\n",
       "      <td>903</td>\n",
       "      <td></td>\n",
       "      <td>2015-06-22 00:12:00</td>\n",
       "      <td>2015</td>\n",
       "      <td>6</td>\n",
       "      <td>Monday</td>\n",
       "      <td>0</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>WASHINGTON ST</td>\n",
       "      <td>42.33383935</td>\n",
       "      <td>-71.08029038</td>\n",
       "      <td>(42.33383935, -71.08029038)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>319073 rows × 17 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       INCIDENT_NUMBER OFFENSE_CODE    OFFENSE_CODE_GROUP  \\\n",
       "0           I182070945        00619               Larceny   \n",
       "1           I182070943        01402             Vandalism   \n",
       "2           I182070941        03410                 Towed   \n",
       "3           I182070940        03114  Investigate Property   \n",
       "4           I182070938        03114  Investigate Property   \n",
       "...                ...          ...                   ...   \n",
       "319068   I050310906-00        03125       Warrant Arrests   \n",
       "319069   I030217815-08        00111              Homicide   \n",
       "319070   I030217815-08        03125       Warrant Arrests   \n",
       "319071   I010370257-00        03125       Warrant Arrests   \n",
       "319072       142052550        03125       Warrant Arrests   \n",
       "\n",
       "                        OFFENSE_DESCRIPTION DISTRICT REPORTING_AREA SHOOTING  \\\n",
       "0                        LARCENY ALL OTHERS      D14            808            \n",
       "1                                 VANDALISM      C11            347            \n",
       "2                       TOWED MOTOR VEHICLE       D4            151            \n",
       "3                      INVESTIGATE PROPERTY       D4            272            \n",
       "4                      INVESTIGATE PROPERTY       B3            421            \n",
       "...                                     ...      ...            ...      ...   \n",
       "319068                       WARRANT ARREST       D4            285            \n",
       "319069  MURDER, NON-NEGLIGIENT MANSLAUGHTER      E18            520            \n",
       "319070                       WARRANT ARREST      E18            520            \n",
       "319071                       WARRANT ARREST      E13            569            \n",
       "319072                       WARRANT ARREST       D4            903            \n",
       "\n",
       "           OCCURRED_ON_DATE  YEAR MONTH DAY_OF_WEEK HOUR    UCR_PART  \\\n",
       "0       2018-09-02 13:00:00  2018     9      Sunday   13    Part One   \n",
       "1       2018-08-21 00:00:00  2018     8     Tuesday    0    Part Two   \n",
       "2       2018-09-03 19:27:00  2018     9      Monday   19  Part Three   \n",
       "3       2018-09-03 21:16:00  2018     9      Monday   21  Part Three   \n",
       "4       2018-09-03 21:05:00  2018     9      Monday   21  Part Three   \n",
       "...                     ...   ...   ...         ...  ...         ...   \n",
       "319068  2016-06-05 17:25:00  2016     6      Sunday   17  Part Three   \n",
       "319069  2015-07-09 13:38:00  2015     7    Thursday   13    Part One   \n",
       "319070  2015-07-09 13:38:00  2015     7    Thursday   13  Part Three   \n",
       "319071  2016-05-31 19:35:00  2016     5     Tuesday   19  Part Three   \n",
       "319072  2015-06-22 00:12:00  2015     6      Monday    0  Part Three   \n",
       "\n",
       "                   STREET          Lat          Long  \\\n",
       "0              LINCOLN ST  42.35779134  -71.13937053   \n",
       "1                HECLA ST  42.30682138  -71.06030035   \n",
       "2             CAZENOVE ST  42.34658879  -71.07242943   \n",
       "3              NEWCOMB ST  42.33418175  -71.07866441   \n",
       "4                DELHI ST  42.27536542  -71.09036101   \n",
       "...                   ...          ...           ...   \n",
       "319068        COVENTRY ST  42.33695098  -71.08574813   \n",
       "319069           RIVER ST  42.25592648  -71.12317207   \n",
       "319070           RIVER ST  42.25592648  -71.12317207   \n",
       "319071  NEW WASHINGTON ST  42.30233307  -71.11156487   \n",
       "319072      WASHINGTON ST  42.33383935  -71.08029038   \n",
       "\n",
       "                           Location  \n",
       "0       (42.35779134, -71.13937053)  \n",
       "1       (42.30682138, -71.06030035)  \n",
       "2       (42.34658879, -71.07242943)  \n",
       "3       (42.33418175, -71.07866441)  \n",
       "4       (42.27536542, -71.09036101)  \n",
       "...                             ...  \n",
       "319068  (42.33695098, -71.08574813)  \n",
       "319069  (42.25592648, -71.12317207)  \n",
       "319070  (42.25592648, -71.12317207)  \n",
       "319071  (42.30233307, -71.11156487)  \n",
       "319072  (42.33383935, -71.08029038)  \n",
       "\n",
       "[319073 rows x 17 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_pandas()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "<div class=\"info_items\" style=\"margin: 10px 0; font-family: sans-serif; font-size: 10px;\">Viewing 10 of 319073 rows / 17 columns</div>\n",
       "<div class=\"info_items\" style=\"margin: 10px 0; font-family: sans-serif; font-size: 10px;\">N/A partition(s) </div>\n",
       "\n",
       "\n",
       "<table class=\"optimus_table\" style=\"font-size: 12px;\">\n",
       "    <thead style=\"border-bottom: 1px solid black;\">\n",
       "    <tr>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">INCIDENT_NUMBER</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">1 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">OFFENSE_CODE</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">2 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">OFFENSE_CODE_GROUP</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">3 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">OFFENSE_DESCRIPTION</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">4 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">DISTRICT</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">5 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">REPORTING_AREA</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">6 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">SHOOTING</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">7 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">OCCURRED_ON_DATE</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">8 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">YEAR</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">9 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">MONTH</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">10 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">DAY_OF_WEEK</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">11 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">HOUR</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">12 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">UCR_PART</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">13 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">STREET</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">14 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">Lat</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">15 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">Long</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">16 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">Location</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">17 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "    </tr>\n",
       "\n",
       "    </thead>\n",
       "    <tbody style=\"font-family: monospace; border-bottom: 1px solid #cccccc;\">\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182070945\">\n",
       "                \n",
       "                I182070945\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"00619\">\n",
       "                \n",
       "                00619\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Larceny\">\n",
       "                \n",
       "                Larceny\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"larceny&#8901;all&#8901;others\">\n",
       "                \n",
       "                larceny&#8901;all&#8901;others\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"D14\">\n",
       "                \n",
       "                D14\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"808\">\n",
       "                \n",
       "                808\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"\">\n",
       "                \n",
       "                \n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018-09-02&#8901;13:00:00\">\n",
       "                \n",
       "                2018-09-02&#8901;13:00:00\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018\">\n",
       "                \n",
       "                2018\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"9\">\n",
       "                \n",
       "                9\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Sunday\">\n",
       "                \n",
       "                Sunday\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"13\">\n",
       "                \n",
       "                13\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Part&#8901;One\">\n",
       "                \n",
       "                Part&#8901;One\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"LINCOLN&#8901;ST\">\n",
       "                \n",
       "                LINCOLN&#8901;ST\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"42.35779134\">\n",
       "                \n",
       "                42.35779134\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"-71.13937053\">\n",
       "                \n",
       "                -71.13937053\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"(42.35779134,&#8901;-71.13937053)\">\n",
       "                \n",
       "                (42.35779134,&#8901;-71.13937053)\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182070943\">\n",
       "                \n",
       "                I182070943\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"01402\">\n",
       "                \n",
       "                01402\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Vandalism\">\n",
       "                \n",
       "                Vandalism\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"vandalism\">\n",
       "                \n",
       "                vandalism\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"C11\">\n",
       "                \n",
       "                C11\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"347\">\n",
       "                \n",
       "                347\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"\">\n",
       "                \n",
       "                \n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018-08-21&#8901;00:00:00\">\n",
       "                \n",
       "                2018-08-21&#8901;00:00:00\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018\">\n",
       "                \n",
       "                2018\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"8\">\n",
       "                \n",
       "                8\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Tuesday\">\n",
       "                \n",
       "                Tuesday\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"0\">\n",
       "                \n",
       "                0\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Part&#8901;Two\">\n",
       "                \n",
       "                Part&#8901;Two\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"HECLA&#8901;ST\">\n",
       "                \n",
       "                HECLA&#8901;ST\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"42.30682138\">\n",
       "                \n",
       "                42.30682138\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"-71.06030035\">\n",
       "                \n",
       "                -71.06030035\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"(42.30682138,&#8901;-71.06030035)\">\n",
       "                \n",
       "                (42.30682138,&#8901;-71.06030035)\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182070941\">\n",
       "                \n",
       "                I182070941\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"03410\">\n",
       "                \n",
       "                03410\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Towed\">\n",
       "                \n",
       "                Towed\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"towed&#8901;motor&#8901;vehicle\">\n",
       "                \n",
       "                towed&#8901;motor&#8901;vehicle\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"D4\">\n",
       "                \n",
       "                D4\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"151\">\n",
       "                \n",
       "                151\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"\">\n",
       "                \n",
       "                \n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018-09-03&#8901;19:27:00\">\n",
       "                \n",
       "                2018-09-03&#8901;19:27:00\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018\">\n",
       "                \n",
       "                2018\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"9\">\n",
       "                \n",
       "                9\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Monday\">\n",
       "                \n",
       "                Monday\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"19\">\n",
       "                \n",
       "                19\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Part&#8901;Three\">\n",
       "                \n",
       "                Part&#8901;Three\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"CAZENOVE&#8901;ST\">\n",
       "                \n",
       "                CAZENOVE&#8901;ST\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"42.34658879\">\n",
       "                \n",
       "                42.34658879\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"-71.07242943\">\n",
       "                \n",
       "                -71.07242943\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"(42.34658879,&#8901;-71.07242943)\">\n",
       "                \n",
       "                (42.34658879,&#8901;-71.07242943)\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182070940\">\n",
       "                \n",
       "                I182070940\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"03114\">\n",
       "                \n",
       "                03114\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Investigate&#8901;Property\">\n",
       "                \n",
       "                Investigate&#8901;Property\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"investigate&#8901;property\">\n",
       "                \n",
       "                investigate&#8901;property\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"D4\">\n",
       "                \n",
       "                D4\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"272\">\n",
       "                \n",
       "                272\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"\">\n",
       "                \n",
       "                \n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018-09-03&#8901;21:16:00\">\n",
       "                \n",
       "                2018-09-03&#8901;21:16:00\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018\">\n",
       "                \n",
       "                2018\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"9\">\n",
       "                \n",
       "                9\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Monday\">\n",
       "                \n",
       "                Monday\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"21\">\n",
       "                \n",
       "                21\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Part&#8901;Three\">\n",
       "                \n",
       "                Part&#8901;Three\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"NEWCOMB&#8901;ST\">\n",
       "                \n",
       "                NEWCOMB&#8901;ST\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"42.33418175\">\n",
       "                \n",
       "                42.33418175\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"-71.07866441\">\n",
       "                \n",
       "                -71.07866441\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"(42.33418175,&#8901;-71.07866441)\">\n",
       "                \n",
       "                (42.33418175,&#8901;-71.07866441)\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182070938\">\n",
       "                \n",
       "                I182070938\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"03114\">\n",
       "                \n",
       "                03114\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Investigate&#8901;Property\">\n",
       "                \n",
       "                Investigate&#8901;Property\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"investigate&#8901;property\">\n",
       "                \n",
       "                investigate&#8901;property\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"B3\">\n",
       "                \n",
       "                B3\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"421\">\n",
       "                \n",
       "                421\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"\">\n",
       "                \n",
       "                \n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018-09-03&#8901;21:05:00\">\n",
       "                \n",
       "                2018-09-03&#8901;21:05:00\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018\">\n",
       "                \n",
       "                2018\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"9\">\n",
       "                \n",
       "                9\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Monday\">\n",
       "                \n",
       "                Monday\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"21\">\n",
       "                \n",
       "                21\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Part&#8901;Three\">\n",
       "                \n",
       "                Part&#8901;Three\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"DELHI&#8901;ST\">\n",
       "                \n",
       "                DELHI&#8901;ST\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"42.27536542\">\n",
       "                \n",
       "                42.27536542\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"-71.09036101\">\n",
       "                \n",
       "                -71.09036101\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"(42.27536542,&#8901;-71.09036101)\">\n",
       "                \n",
       "                (42.27536542,&#8901;-71.09036101)\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182070936\">\n",
       "                \n",
       "                I182070936\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"03820\">\n",
       "                \n",
       "                03820\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Motor&#8901;Vehicle&#8901;Accident&#8901;Response\">\n",
       "                \n",
       "                Motor&#8901;Vehicle&#8901;Accident&#8901;Response\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"m/v&#8901;accident&#8901;involving&#8901;pedestrian&#8901;-&#8901;injury\">\n",
       "                \n",
       "                m/v&#8901;accident&#8901;involving&#8901;pedestrian&#8901;-&#8901;injury\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"C11\">\n",
       "                \n",
       "                C11\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"398\">\n",
       "                \n",
       "                398\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"\">\n",
       "                \n",
       "                \n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018-09-03&#8901;21:09:00\">\n",
       "                \n",
       "                2018-09-03&#8901;21:09:00\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018\">\n",
       "                \n",
       "                2018\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"9\">\n",
       "                \n",
       "                9\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Monday\">\n",
       "                \n",
       "                Monday\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"21\">\n",
       "                \n",
       "                21\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Part&#8901;Three\">\n",
       "                \n",
       "                Part&#8901;Three\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"TALBOT&#8901;AVE\">\n",
       "                \n",
       "                TALBOT&#8901;AVE\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"42.29019621\">\n",
       "                \n",
       "                42.29019621\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"-71.07159012\">\n",
       "                \n",
       "                -71.07159012\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"(42.29019621,&#8901;-71.07159012)\">\n",
       "                \n",
       "                (42.29019621,&#8901;-71.07159012)\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182070933\">\n",
       "                \n",
       "                I182070933\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"00724\">\n",
       "                \n",
       "                00724\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Auto&#8901;Theft\">\n",
       "                \n",
       "                Auto&#8901;Theft\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"auto&#8901;theft\">\n",
       "                \n",
       "                auto&#8901;theft\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"B2\">\n",
       "                \n",
       "                B2\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"330\">\n",
       "                \n",
       "                330\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"\">\n",
       "                \n",
       "                \n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018-09-03&#8901;21:25:00\">\n",
       "                \n",
       "                2018-09-03&#8901;21:25:00\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018\">\n",
       "                \n",
       "                2018\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"9\">\n",
       "                \n",
       "                9\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Monday\">\n",
       "                \n",
       "                Monday\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"21\">\n",
       "                \n",
       "                21\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Part&#8901;One\">\n",
       "                \n",
       "                Part&#8901;One\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"NORMANDY&#8901;ST\">\n",
       "                \n",
       "                NORMANDY&#8901;ST\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"42.30607218\">\n",
       "                \n",
       "                42.30607218\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"-71.08273260\">\n",
       "                \n",
       "                -71.08273260\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"(42.30607218,&#8901;-71.08273260)\">\n",
       "                \n",
       "                (42.30607218,&#8901;-71.08273260)\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182070932\">\n",
       "                \n",
       "                I182070932\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"03301\">\n",
       "                \n",
       "                03301\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Verbal&#8901;Disputes\">\n",
       "                \n",
       "                Verbal&#8901;Disputes\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"verbal&#8901;dispute\">\n",
       "                \n",
       "                verbal&#8901;dispute\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"B2\">\n",
       "                \n",
       "                B2\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"584\">\n",
       "                \n",
       "                584\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"\">\n",
       "                \n",
       "                \n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018-09-03&#8901;20:39:37\">\n",
       "                \n",
       "                2018-09-03&#8901;20:39:37\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018\">\n",
       "                \n",
       "                2018\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"9\">\n",
       "                \n",
       "                9\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Monday\">\n",
       "                \n",
       "                Monday\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"20\">\n",
       "                \n",
       "                20\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Part&#8901;Three\">\n",
       "                \n",
       "                Part&#8901;Three\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"LAWN&#8901;ST\">\n",
       "                \n",
       "                LAWN&#8901;ST\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"42.32701648\">\n",
       "                \n",
       "                42.32701648\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"-71.10555088\">\n",
       "                \n",
       "                -71.10555088\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"(42.32701648,&#8901;-71.10555088)\">\n",
       "                \n",
       "                (42.32701648,&#8901;-71.10555088)\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182070931\">\n",
       "                \n",
       "                I182070931\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"00301\">\n",
       "                \n",
       "                00301\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Robbery\">\n",
       "                \n",
       "                Robbery\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"robbery&#8901;-&#8901;street\">\n",
       "                \n",
       "                robbery&#8901;-&#8901;street\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"C6\">\n",
       "                \n",
       "                C6\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"177\">\n",
       "                \n",
       "                177\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"\">\n",
       "                \n",
       "                \n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018-09-03&#8901;20:48:00\">\n",
       "                \n",
       "                2018-09-03&#8901;20:48:00\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"2018\">\n",
       "                \n",
       "                2018\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"9\">\n",
       "                \n",
       "                9\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Monday\">\n",
       "                \n",
       "                Monday\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"20\">\n",
       "                \n",
       "                20\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"Part&#8901;One\">\n",
       "                \n",
       "                Part&#8901;One\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"MASSACHUSETTS&#8901;AVE\">\n",
       "                \n",
       "                MASSACHUSETTS&#8901;AVE\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"42.33152148\">\n",
       "                \n",
       "                42.33152148\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"-71.07085307\">\n",
       "                \n",
       "                -71.07085307\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"(42.33152148,&#8901;-71.07085307)\">\n",
       "                \n",
       "                (42.33152148,&#8901;-71.07085307)\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    </tbody>\n",
       "</table>\n",
       "\n",
       "<div class=\"info_items\" style=\"margin: 10px 0; font-family: sans-serif; font-size: 10px;\">Viewing 10 of 319073 rows / 17 columns</div>\n",
       "<div class=\"info_items\" style=\"margin: 10px 0; font-family: sans-serif; font-size: 10px;\">N/A partition(s) &lt;class &#39;optimus.engines.pandas.dataframe.PandasDataFrame&#39;&gt;</div>\n",
       "\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<class 'optimus.engines.pandas.dataframe.PandasDataFrame'>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.to_optimus_pandas().cols.lower(\"OFFENSE_DESCRIPTION\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'profile': {'columns': {'INCIDENT_NUMBER': {'profiler_dtype': {'dtype': 'string'},\n",
       "    'stats': {'match': 319073,\n",
       "     'missing': 0,\n",
       "     'mismatch': 0,\n",
       "     'profiler_dtype': {'dtype': 'string'},\n",
       "     'frequency': [{'value': 'I162030584', 'count': 13},\n",
       "      {'value': 'I152080623', 'count': 11},\n",
       "      {'value': 'I172013170', 'count': 10},\n",
       "      {'value': 'I182065208', 'count': 10},\n",
       "      {'value': 'I172096394', 'count': 10},\n",
       "      {'value': 'I162071327', 'count': 9},\n",
       "      {'value': 'I162001871', 'count': 9},\n",
       "      {'value': 'I172056883', 'count': 9},\n",
       "      {'value': 'I172054429', 'count': 9},\n",
       "      {'value': 'I162098170', 'count': 9},\n",
       "      {'value': 'I172022524', 'count': 9},\n",
       "      {'value': 'I152076465', 'count': 8},\n",
       "      {'value': 'I172053616', 'count': 8},\n",
       "      {'value': 'I152105431', 'count': 8},\n",
       "      {'value': 'I162082917', 'count': 8},\n",
       "      {'value': 'I162064331', 'count': 8},\n",
       "      {'value': 'I162056703', 'count': 8},\n",
       "      {'value': 'I130041200-00', 'count': 8},\n",
       "      {'value': 'I162087224', 'count': 8},\n",
       "      {'value': 'I162022140', 'count': 8},\n",
       "      {'value': 'I172069723', 'count': 8},\n",
       "      {'value': 'I162090278', 'count': 8},\n",
       "      {'value': 'I162074826', 'count': 8},\n",
       "      {'value': 'I162078338', 'count': 8},\n",
       "      {'value': 'I152101399', 'count': 7},\n",
       "      {'value': 'I152095733', 'count': 7},\n",
       "      {'value': 'I162054378', 'count': 7},\n",
       "      {'value': 'I152067057', 'count': 7},\n",
       "      {'value': 'I152096998', 'count': 7},\n",
       "      {'value': 'I172018004', 'count': 7},\n",
       "      {'value': 'I162083089', 'count': 7},\n",
       "      {'value': 'I162045680', 'count': 7},\n",
       "      {'value': 'I152071480', 'count': 7}],\n",
       "     'count_uniques': 282517},\n",
       "    'dtype': 'object'}},\n",
       "  'name': None,\n",
       "  'file_name': None,\n",
       "  'summary': {'cols_count': 17,\n",
       "   'rows_count': 319073,\n",
       "   'dtypes_list': ['object'],\n",
       "   'total_count_dtypes': 1,\n",
       "   'missing_count': 0,\n",
       "   'p_missing': 0.0}},\n",
       " 'transformations': {'actions': []}}"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.meta"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "<div class=\"info_items\" style=\"margin: 10px 0; font-family: sans-serif; font-size: 10px;\">Viewing 10 of 319073 rows / 1 columns</div>\n",
       "<div class=\"info_items\" style=\"margin: 10px 0; font-family: sans-serif; font-size: 10px;\">1 partition(s) </div>\n",
       "\n",
       "\n",
       "<table class=\"optimus_table\" style=\"font-size: 12px;\">\n",
       "    <thead style=\"border-bottom: 1px solid black;\">\n",
       "    <tr>\n",
       "        \n",
       "        <th style=\"font-family: sans-serif;\">\n",
       "            <div class=\"column_name\" style=\"font-size: 1.2em;\">INCIDENT_NUMBER</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">1 (object)</div>\n",
       "            <div class=\"data_type\" style=\"font-size: 0.8em; font-weight: normal;\">\n",
       "                \n",
       "                not nullable\n",
       "                \n",
       "            </div>\n",
       "        </th>\n",
       "        \n",
       "    </tr>\n",
       "\n",
       "    </thead>\n",
       "    <tbody style=\"font-family: monospace; border-bottom: 1px solid #cccccc;\">\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182016471\">\n",
       "                \n",
       "                I182016471\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I182062395\">\n",
       "                \n",
       "                I182062395\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I162052877\">\n",
       "                \n",
       "                I162052877\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I162067216\">\n",
       "                \n",
       "                I162067216\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I172079919\">\n",
       "                \n",
       "                I172079919\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I162027167\">\n",
       "                \n",
       "                I162027167\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I162039177\">\n",
       "                \n",
       "                I162039177\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I172093225\">\n",
       "                \n",
       "                I172093225\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I162030885\">\n",
       "                \n",
       "                I162030885\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    <tr>\n",
       "        \n",
       "        <td style=\"border: 0px;\">\n",
       "            <div style=\"min-height: 14px;\" title=\"I162028326\">\n",
       "                \n",
       "                I162028326\n",
       "                 \n",
       "            </div>\n",
       "        </td>\n",
       "        \n",
       "    </tr>\n",
       "    \n",
       "    </tbody>\n",
       "</table>\n",
       "\n",
       "<div class=\"info_items\" style=\"margin: 10px 0; font-family: sans-serif; font-size: 10px;\">Viewing 10 of 319073 rows / 1 columns</div>\n",
       "<div class=\"info_items\" style=\"margin: 10px 0; font-family: sans-serif; font-size: 10px;\">1 partition(s) &lt;class &#39;optimus.engines.dask.dataframe.DaskDataFrame&#39;&gt;</div>\n",
       "\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<class 'optimus.engines.dask.dataframe.DaskDataFrame'>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>INCIDENT_NUMBER</th>\n",
       "      <th>OFFENSE_CODE</th>\n",
       "      <th>OFFENSE_CODE_GROUP</th>\n",
       "      <th>OFFENSE_DESCRIPTION</th>\n",
       "      <th>DISTRICT</th>\n",
       "      <th>REPORTING_AREA</th>\n",
       "      <th>SHOOTING</th>\n",
       "      <th>OCCURRED_ON_DATE</th>\n",
       "      <th>YEAR</th>\n",
       "      <th>MONTH</th>\n",
       "      <th>DAY_OF_WEEK</th>\n",
       "      <th>HOUR</th>\n",
       "      <th>UCR_PART</th>\n",
       "      <th>STREET</th>\n",
       "      <th>Lat</th>\n",
       "      <th>Long</th>\n",
       "      <th>Location</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>larceny</td>\n",
       "      <td>00619</td>\n",
       "      <td>Larceny</td>\n",
       "      <td>LARCENY ALL OTHERS</td>\n",
       "      <td>D14</td>\n",
       "      <td>808</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-02 13:00:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Sunday</td>\n",
       "      <td>13</td>\n",
       "      <td>Part One</td>\n",
       "      <td>LINCOLN ST</td>\n",
       "      <td>42.35779134</td>\n",
       "      <td>-71.13937053</td>\n",
       "      <td>(42.35779134, -71.13937053)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>I182070943</td>\n",
       "      <td>01402</td>\n",
       "      <td>Vandalism</td>\n",
       "      <td>VANDALISM</td>\n",
       "      <td>C11</td>\n",
       "      <td>347</td>\n",
       "      <td></td>\n",
       "      <td>2018-08-21 00:00:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>8</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>0</td>\n",
       "      <td>Part Two</td>\n",
       "      <td>HECLA ST</td>\n",
       "      <td>42.30682138</td>\n",
       "      <td>-71.06030035</td>\n",
       "      <td>(42.30682138, -71.06030035)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>I182070941</td>\n",
       "      <td>03410</td>\n",
       "      <td>Towed</td>\n",
       "      <td>TOWED MOTOR VEHICLE</td>\n",
       "      <td>D4</td>\n",
       "      <td>151</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 19:27:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>19</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>CAZENOVE ST</td>\n",
       "      <td>42.34658879</td>\n",
       "      <td>-71.07242943</td>\n",
       "      <td>(42.34658879, -71.07242943)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>I182070940</td>\n",
       "      <td>03114</td>\n",
       "      <td>Investigate Property</td>\n",
       "      <td>INVESTIGATE PROPERTY</td>\n",
       "      <td>D4</td>\n",
       "      <td>272</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 21:16:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>21</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>NEWCOMB ST</td>\n",
       "      <td>42.33418175</td>\n",
       "      <td>-71.07866441</td>\n",
       "      <td>(42.33418175, -71.07866441)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>I182070938</td>\n",
       "      <td>03114</td>\n",
       "      <td>Investigate Property</td>\n",
       "      <td>INVESTIGATE PROPERTY</td>\n",
       "      <td>B3</td>\n",
       "      <td>421</td>\n",
       "      <td></td>\n",
       "      <td>2018-09-03 21:05:00</td>\n",
       "      <td>2018</td>\n",
       "      <td>9</td>\n",
       "      <td>Monday</td>\n",
       "      <td>21</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>DELHI ST</td>\n",
       "      <td>42.27536542</td>\n",
       "      <td>-71.09036101</td>\n",
       "      <td>(42.27536542, -71.09036101)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319068</th>\n",
       "      <td>I050310906-00</td>\n",
       "      <td>03125</td>\n",
       "      <td>Warrant Arrests</td>\n",
       "      <td>WARRANT ARREST</td>\n",
       "      <td>D4</td>\n",
       "      <td>285</td>\n",
       "      <td></td>\n",
       "      <td>2016-06-05 17:25:00</td>\n",
       "      <td>2016</td>\n",
       "      <td>6</td>\n",
       "      <td>Sunday</td>\n",
       "      <td>17</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>COVENTRY ST</td>\n",
       "      <td>42.33695098</td>\n",
       "      <td>-71.08574813</td>\n",
       "      <td>(42.33695098, -71.08574813)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319069</th>\n",
       "      <td>I030217815-08</td>\n",
       "      <td>00111</td>\n",
       "      <td>Homicide</td>\n",
       "      <td>MURDER, NON-NEGLIGIENT MANSLAUGHTER</td>\n",
       "      <td>E18</td>\n",
       "      <td>520</td>\n",
       "      <td></td>\n",
       "      <td>2015-07-09 13:38:00</td>\n",
       "      <td>2015</td>\n",
       "      <td>7</td>\n",
       "      <td>Thursday</td>\n",
       "      <td>13</td>\n",
       "      <td>Part One</td>\n",
       "      <td>RIVER ST</td>\n",
       "      <td>42.25592648</td>\n",
       "      <td>-71.12317207</td>\n",
       "      <td>(42.25592648, -71.12317207)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319070</th>\n",
       "      <td>I030217815-08</td>\n",
       "      <td>03125</td>\n",
       "      <td>Warrant Arrests</td>\n",
       "      <td>WARRANT ARREST</td>\n",
       "      <td>E18</td>\n",
       "      <td>520</td>\n",
       "      <td></td>\n",
       "      <td>2015-07-09 13:38:00</td>\n",
       "      <td>2015</td>\n",
       "      <td>7</td>\n",
       "      <td>Thursday</td>\n",
       "      <td>13</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>RIVER ST</td>\n",
       "      <td>42.25592648</td>\n",
       "      <td>-71.12317207</td>\n",
       "      <td>(42.25592648, -71.12317207)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319071</th>\n",
       "      <td>I010370257-00</td>\n",
       "      <td>03125</td>\n",
       "      <td>Warrant Arrests</td>\n",
       "      <td>WARRANT ARREST</td>\n",
       "      <td>E13</td>\n",
       "      <td>569</td>\n",
       "      <td></td>\n",
       "      <td>2016-05-31 19:35:00</td>\n",
       "      <td>2016</td>\n",
       "      <td>5</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>19</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>NEW WASHINGTON ST</td>\n",
       "      <td>42.30233307</td>\n",
       "      <td>-71.11156487</td>\n",
       "      <td>(42.30233307, -71.11156487)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319072</th>\n",
       "      <td>142052550</td>\n",
       "      <td>03125</td>\n",
       "      <td>Warrant Arrests</td>\n",
       "      <td>WARRANT ARREST</td>\n",
       "      <td>D4</td>\n",
       "      <td>903</td>\n",
       "      <td></td>\n",
       "      <td>2015-06-22 00:12:00</td>\n",
       "      <td>2015</td>\n",
       "      <td>6</td>\n",
       "      <td>Monday</td>\n",
       "      <td>0</td>\n",
       "      <td>Part Three</td>\n",
       "      <td>WASHINGTON ST</td>\n",
       "      <td>42.33383935</td>\n",
       "      <td>-71.08029038</td>\n",
       "      <td>(42.33383935, -71.08029038)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>319073 rows × 17 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       INCIDENT_NUMBER OFFENSE_CODE    OFFENSE_CODE_GROUP  \\\n",
       "0              larceny        00619               Larceny   \n",
       "1           I182070943        01402             Vandalism   \n",
       "2           I182070941        03410                 Towed   \n",
       "3           I182070940        03114  Investigate Property   \n",
       "4           I182070938        03114  Investigate Property   \n",
       "...                ...          ...                   ...   \n",
       "319068   I050310906-00        03125       Warrant Arrests   \n",
       "319069   I030217815-08        00111              Homicide   \n",
       "319070   I030217815-08        03125       Warrant Arrests   \n",
       "319071   I010370257-00        03125       Warrant Arrests   \n",
       "319072       142052550        03125       Warrant Arrests   \n",
       "\n",
       "                        OFFENSE_DESCRIPTION DISTRICT REPORTING_AREA SHOOTING  \\\n",
       "0                        LARCENY ALL OTHERS      D14            808            \n",
       "1                                 VANDALISM      C11            347            \n",
       "2                       TOWED MOTOR VEHICLE       D4            151            \n",
       "3                      INVESTIGATE PROPERTY       D4            272            \n",
       "4                      INVESTIGATE PROPERTY       B3            421            \n",
       "...                                     ...      ...            ...      ...   \n",
       "319068                       WARRANT ARREST       D4            285            \n",
       "319069  MURDER, NON-NEGLIGIENT MANSLAUGHTER      E18            520            \n",
       "319070                       WARRANT ARREST      E18            520            \n",
       "319071                       WARRANT ARREST      E13            569            \n",
       "319072                       WARRANT ARREST       D4            903            \n",
       "\n",
       "           OCCURRED_ON_DATE  YEAR MONTH DAY_OF_WEEK HOUR    UCR_PART  \\\n",
       "0       2018-09-02 13:00:00  2018     9      Sunday   13    Part One   \n",
       "1       2018-08-21 00:00:00  2018     8     Tuesday    0    Part Two   \n",
       "2       2018-09-03 19:27:00  2018     9      Monday   19  Part Three   \n",
       "3       2018-09-03 21:16:00  2018     9      Monday   21  Part Three   \n",
       "4       2018-09-03 21:05:00  2018     9      Monday   21  Part Three   \n",
       "...                     ...   ...   ...         ...  ...         ...   \n",
       "319068  2016-06-05 17:25:00  2016     6      Sunday   17  Part Three   \n",
       "319069  2015-07-09 13:38:00  2015     7    Thursday   13    Part One   \n",
       "319070  2015-07-09 13:38:00  2015     7    Thursday   13  Part Three   \n",
       "319071  2016-05-31 19:35:00  2016     5     Tuesday   19  Part Three   \n",
       "319072  2015-06-22 00:12:00  2015     6      Monday    0  Part Three   \n",
       "\n",
       "                   STREET          Lat          Long  \\\n",
       "0              LINCOLN ST  42.35779134  -71.13937053   \n",
       "1                HECLA ST  42.30682138  -71.06030035   \n",
       "2             CAZENOVE ST  42.34658879  -71.07242943   \n",
       "3              NEWCOMB ST  42.33418175  -71.07866441   \n",
       "4                DELHI ST  42.27536542  -71.09036101   \n",
       "...                   ...          ...           ...   \n",
       "319068        COVENTRY ST  42.33695098  -71.08574813   \n",
       "319069           RIVER ST  42.25592648  -71.12317207   \n",
       "319070           RIVER ST  42.25592648  -71.12317207   \n",
       "319071  NEW WASHINGTON ST  42.30233307  -71.11156487   \n",
       "319072      WASHINGTON ST  42.33383935  -71.08029038   \n",
       "\n",
       "                           Location  \n",
       "0       (42.35779134, -71.13937053)  \n",
       "1       (42.30682138, -71.06030035)  \n",
       "2       (42.34658879, -71.07242943)  \n",
       "3       (42.33418175, -71.07866441)  \n",
       "4       (42.27536542, -71.09036101)  \n",
       "...                             ...  \n",
       "319068  (42.33695098, -71.08574813)  \n",
       "319069  (42.25592648, -71.12317207)  \n",
       "319070  (42.25592648, -71.12317207)  \n",
       "319071  (42.30233307, -71.11156487)  \n",
       "319072  (42.33383935, -71.08029038)  \n",
       "\n",
       "[319073 rows x 17 columns]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import dask\n",
    "from dask.dataframe import from_delayed\n",
    "\n",
    "\n",
    "def oset(col_name, expr, where):\n",
    "    \n",
    "    where = (where.data[where.cols.names(0)[0]]).to_delayed()\n",
    "    ddf = df.to_delayed()\n",
    "    \n",
    "    def func(_df, _col_name, _mask):\n",
    "        \n",
    "        _df.loc[_mask,[_col_name]]=expr(_df)\n",
    "        return _df\n",
    "\n",
    "    for _part,_mask in zip(ddf, where):\n",
    "        delayed_parts = dask.delayed(func)(_part, col_name, _mask)\n",
    "\n",
    "    return from_delayed(delayed_parts)\n",
    "\n",
    "col_name=\"INCIDENT_NUMBER\"\n",
    "where= ((df[col_name]==\"I182070945\") | (df[\"DISTRICT\"]==\"I182070945\"))\n",
    "F = df.functions\n",
    "\n",
    "def expr(series):\n",
    "    return F.lower(series[\"OFFENSE_CODE_GROUP\"])\n",
    "\n",
    "\n",
    "oset(col_name, expr, where).compute()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
